<% if object && object.errors.any? %>
<div class="form-error">
  <span class="form-error-field"><%= object.errors.full_messages[0] %></span>
  <span class="glyphicon glyphicon-info-sign icon"></span>
</div>
<% end %>